﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Published.aspx.cs" Inherits="JoinParty.admin.FlowStep.Published" %>

<%@ Register Src="../Control/UserMessage.ascx" TagName="UserMessage" TagPrefix="UC" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../Resource/js/jquery/jquery.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
        <f:Panel ID="Panel1" ShowBorder="false" ShowHeader="false" AutoScroll="true" runat="server" BodyStyle="padding-top:20px">
            <Toolbars>
                <f:Toolbar ID="Toolbar1" runat="server" Position="Bottom" ToolbarAlign="Center">
                    <Items>
                        <f:Button ID="btnSaveClose" ValidateForms="SimpleForm1" Icon="SystemSaveClose" OnClick="btnSaveClose_Click"
                            runat="server" Text="保存并关闭">
                        </f:Button>
                        <f:Button ID="btnSubmit" runat="server" CssClass="marginr" OnClick="btnSubmit_Click" Icon="Tick"
                            Text="提交">
                        </f:Button>
                        <f:Button ID="btnClose" Icon="SystemClose" EnablePostBack="false" runat="server"
                            Text="关闭">
                        </f:Button>
                    </Items>
                </f:Toolbar>
            </Toolbars>
            <Items>
                <f:ContentPanel ID="cPanel" runat="server" ShowBorder="false" ShowHeader="false">
                    <div style="padding-left: 30px">
                        <UC:UserMessage ID="UserM" runat="server" />
                    </div>
                </f:ContentPanel>
                <%--<f:HtmlEditor ID="hePublished" runat="server" LabelAlign="right" Width="620px" Height="250px"></f:HtmlEditor>--%>
                <f:Label ID="lbPublished" runat="server" LabelAlign="left"></f:Label>
                <f:ContentPanel ID="cpPublished" runat="server" ShowBorder="false" ShowHeader="false" Title="baad">
                    <script type="text/plain" name="editor" id="editor"></script>
                </f:ContentPanel>
            </Items>
        </f:Panel>
        <f:Window ID="WSetpThree" Title="编辑" Hidden="true" EnableIFrame="true" runat="server"
            EnableMaximize="true" EnableResize="true" Target="Top" IsModal="True" Width="550px"
            Height="350px">
        </f:Window>
    </form>
</body>
<script src="../../../../Resource/js/jquery/jquery.min.js"></script>
<script src="../../../../Resource/ueditor/ueditor.config.js"></script>
<script src="../../../../Resource/ueditor/ueditor.all.min.js"></script>
<script>
    var containerClientID = '<%= cpPublished.ClientID %>';

    var editor;
    F.ready(function () {
        // 初始化
        editor = UE.getEditor('editor', {
            initialFrameWidth: '100%',
            initialFrameHeight: '400px',
            enableAutoSave: false,
            saveInterval: 100000,
            elementPathEnabled: false,
            autoHeightEnabled: false,
            autoFloatEnabled: false,
            onready: function () {
                // 重新布局外部容器
                F(containerClientID).updateLayout();
                updateEditor('<%= this.PublishedContent%>');
            }
        });

    });

    // 更新编辑器内容
    function updateEditor(content) {
        if (editor && editor.isReady) {
            editor.setContent(content);
        }
    }
</script>
</html>
